<div class="breadLine">
   <div class="adminControl">Danh sách module</div>
</div>
<div class="navigation">
   <?
   $i = 1;
   if($admin_name == 'admin'){
      $string_query = "SELECT  
                              mod_name,
                              mod_filename,
                              mod_pathname,
                              mod_fullname 
                           FROM 
                              moduols 
                           WHERE 
                              mod_status = 1 
                           ORDER BY 
                              mod_order";
   }else{
      $string_query = "SELECT 
                              mod_name,
                              mod_filename,
                              mod_pathname,
                              mod_fullname  
                           FROM 
                              moduols
                           INNER JOIN  
                              author
                           ON
                              moduols.mod_id = author.mod_id
                           WHERE 
                              mod_status = 1
                              AND
                              adt_id = ".$admin_id." 
                           ORDER BY 
                              mod_order";
   }
   //echo $string_query;die();
   $db_sel_mod = new db_query($string_query);
   while($row = mysql_fetch_assoc($db_sel_mod->result)){
      
      ?>
      <li class="openable">
         <a href="">
              <span class="isw-grid"></span><span class="text"><?=$row['mod_fullname']?></span>
          </a>
         <ul>
            <?
            $arr_md     = explode('|',$row['mod_filename']);
            $arr_mph    = explode('|',$row['mod_pathname']);
            $pa_moduol  = 'modules/'.$row['mod_name'].'/';
            $j=0;
            foreach($arr_mph as $path_m){
               if(file_exists($pa_moduol.$path_m)){
                  $j++;
               ?>
               <li class="m add_tab" statu="0" id="<?=$i?>" tit_nav="<?=$row['mod_name']?>»<?=$arr_md[$j-1]?>" url_tab="<?=$pa_moduol.$path_m?>">
                  <a onclick="return false">
                     <span class="icon-chevron-right"></span>
                     <em class="text"><?=$arr_md[$j-1]?></em>
                  </a>
                  <span id="numbe_<?=$i?>" style="display: none;">0</span>
               </li>
               <?
               $i++;
               }
            }
            ?>
            
         </ul>
      </li>
      <?
   }unset($db_sel_mod);?>
</div>